
<%@ page import="BaseClass.OrderInfo" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 郭宇轩
  Date: 2020/11/14
  Time: 20:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>订单查询</title>
    <style type="text/css">
        @import url("../static/css/Header.css");
    </style>

</head>
<%@include file="../MainPage/Header.jsp"%>

    <!-- 获取装载数据的PetInfo-->
    <% List<OrderInfo> orderInfos = (List<OrderInfo>) session.getAttribute("OrderInfo"); %>
    <table border="1">
        <tr>
            <th>订单号</th>
            <th>订单宠物</th>
            <th>订单价格</th>
            <th>订单状态</th>
        </tr>

        <% for(OrderInfo p : orderInfos){ %>
        <tr>
            <td><%= p.getID()%></td>
            <td><%= p.getProduct()%></td>
            <td><%= p.getCost()%></td>
            <td><%= p.getStatus()%></td>

            <% if (p.getStatus().equals("待付款")) {%>
            <td><a href="ConfirmLocation.jsp?orderID=<%=p.getID()%>&orderCost=<%=p.getCost()%>" type="text" onclick="">付款</a></td>
            <% } else{ %>
            <td><a href="../RemoveOrderServlet?orderID=<%=p.getID() %>" type="text" onclick="">删除</a></td>
            <% } %>
        </tr>
        <% } %>
    </table>
    <%--    <input type="button" formaction="" formmethod="post" value="保存"/>--%>

</body>
</html>
